-- GENERATED SPELL FOR [Sunfury Arcanist] --


function spell0_20134(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(34447,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20134', 646, 1)
end

function spell1_20134(pUnit, Event) --@Bloodcrystal Surge,Self--
pUnit:FullCastSpellOnTarget(35778,pUnit)
pUnit:RegisterEvent('Sorts_20134', 20258, 1)
end

function Sorts_20134(pUnit, Event)
local choix_sorts_20134 = math.random(0, 1)
if choix_sorts_20134 == 0 then
pUnit:RegisterEvent('spell0_20134', 1, 1)
end
if choix_sorts_20134 == 1 then
pUnit:RegisterEvent('spell1_20134', 1, 1)
end
end

function mob20134_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20134', math.random(1500, 3000), 1)
end

function mob20134_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20134_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20134_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20134, 1, 'mob20134_Action')
RegisterUnitEvent(20134, 2, 'mob20134_Leave')
RegisterUnitEvent(20134, 3, 'mob20134_Kill')
RegisterUnitEvent(20134, 4, 'mob20134_Die')
